/**
 * Created with IntelliJ IDEA.
 * User: lishiwei
 * Date: 12-12-24
 * Time: 下午2:46
 * To change this template use File | Settings | File Templates.
 */
Ext.define('Airways.view.customer.CustPopPanel',{
    extend:'Ext.form.Panel',
    alias:'widget.custPopPanel',
    height:300,
    width:600,
    frame:true,
    header:false,
    bodyBorder:false,
    defaults:{
        xtype:'textfield',
        labelAlign:'right',
        labelWidth:100,
        width:250
    },
    layout:{
        type:'table',
        columns:2
    },
    initComponent:function(){
        this.items = this.buildItems();
        this.callParent(arguments);
    },
    buildItems:function(){
        return [ {
            fieldLabel:'客户名称',
            name:'custName',
            maxLength:100,
            afterLabelTextTpl: required,
            allowBlank:false
        },{
            fieldLabel:'中文名称缩写',
            name:'custRIF',
            maxLength:50
        },{
            fieldLabel:'客户编码',
            name:'custCode',
            maxLength:100,
            afterLabelTextTpl: required,
            allowBlank:false

        },{
            fieldLabel:'英文名称',
            name:'enName',
            maxLength:100
        },{
            fieldLabel:'电话',
            name:'phone',
            vtype:'mobile',
            maxLength:20,
            afterLabelTextTpl: required,
            allowBlank:false
        },{
            fieldLabel:'客户类型',
            xtype:'combo',
            name:'custType',
            queryMode:'local',
            displayField:'value',
            valueField:'key',
            value:'002',
            store:Ext.create('Ext.data.Store',{
                model:'comboxModel',
                data:[{key:'001',value:'VIP客户'},{key:'002',value:'高富帅客户'},{key:'003',value:'白富美客户'},{key:'004',value:'纯屌丝客户'}]
            })
        },{
            fieldLabel:'海关代码',
            name:'hsCode',
            maxLength:20
        },{
            fieldLabel:'EDI通讯码',
            name:'EDICode',
            maxLength:20
        },{
            fieldLabel:'传真',
            name:'fax',
            maxLength:20
        },{
            fieldLabel:'电传',
            name:'tix',
            maxLength:20
        },{
            fieldLabel:'邮件',
            name:'email',
            vtype:'email',
            maxLength:100
        },{
            fieldLabel:'联系人',
            name:'contract',
            maxLength:100
        },{
            fieldLabel:'地址',
            name:'address',
            maxLength:200
        },{
            xtype:'numberfield',
            fieldLabel:'级别',
            name:'level',
            maxLength:20,
            value:0
        },{
            xtype:'numberfield',
            fieldLabel:'最小协议退单天数',
            name:'limitContract',
            maxLength:20,
            value:3
        },{
            fieldLabel:'状态',
            xtype: 'radiogroup',
            columns: 2,
            colspan:2,
            vertical: true,
            items: [
                {boxLabel: '启用', name: 'status',inputValue: '1',checked: true},
                {boxLabel: '禁用', name: 'status',inputValue: '0'}
            ]
        },{
            name:'remark',
            xtype:'textareafield',
            width:500,
            colspan:2,
            maxLength:500,
            fieldLabel:'备注'
        },{
            name:'custId',
            hidden:true
        },{
            name:'version',
            hidden:true,
            value:0
        }
     ];
    }
});

